Azure Traffic Manager: Update Traffic Manager CLI commands to correspond to 2024-04-01-preview API#33503
Open
ransinha1989 wants to merge 5 commits into
Open
Azure Traffic Manager: Update Traffic Manager CLI commands to correspond to 2024-04-01-preview API#33503ransinha1989 wants to merge 5 commits into
ransinha1989 wants to merge 5 commits into
Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| network traffic-manager profile create | cmd network traffic-manager profile create added parameter record_type |
||
| network traffic-manager profile update | cmd network traffic-manager profile update added parameter record_type |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates Azure CLI Network Traffic Manager support to the 2024-04-01-preview API surface, adds --record-type support for Traffic Manager profiles, and introduces new AAZ-generated Traffic Manager commands (heat map, user metrics key, check-dns-v2), along with scenario tests/recordings for the new record-type behavior.
Changes:
- Add scenario tests + recordings validating
--record-typeon Traffic Manager profile create/show/list and update flows. - Extend legacy custom wrappers and parameter definitions to accept
record_type. - Regenerate/introduce AAZ commands for Traffic Manager (profiles/endpoints) using
2024-04-01-preview, plus new command groups (heat-map, user-metrics-key, check-dns-v2).
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py | Adds scenario coverage for Traffic Manager profile recordType create and update flows. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_subnet_routing.yaml | Updates recorded Traffic Manager calls to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_record_type_update.yaml | Adds new recording for record-type update scenario. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_record_type.yaml | Adds new recording for record-type create/show/list scenario. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_always_serve.yaml | Updates recorded Traffic Manager calls to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager2.yaml | Updates recorded Traffic Manager calls to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager.yaml | Updates recorded Traffic Manager calls to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_tmlink.yaml | Updates recorded Traffic Manager calls to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_alias.yaml | Updates recorded Traffic Manager calls to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/custom.py | Adds record_type parameter support in Traffic Manager profile create/update wrappers. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/_show.py | New AAZ command: show Traffic Manager user-metrics-key. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/_delete.py | New AAZ command: delete Traffic Manager user-metrics-key. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/_create.py | New AAZ command: create Traffic Manager user-metrics-key. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/init.py | Exposes new user-metrics-key command group. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/__cmd_group.py | Registers network traffic-manager user-metrics-key command group. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/heat_map/_show.py | New AAZ command: show Traffic Manager profile heat map. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/heat_map/init.py | Exposes new heat-map command group. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/heat_map/__cmd_group.py | Registers network traffic-manager profile heat-map command group. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_update.py | Moves profile update to 2024-04-01-preview and adds --record-type wiring. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_show.py | Moves profile show to 2024-04-01-preview and returns recordType. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_list.py | Moves profile list to 2024-04-01-preview and returns recordType. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_delete.py | Moves profile delete to 2024-04-01-preview and changes output behavior. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_create.py | Moves profile create to 2024-04-01-preview and adds --record-type wiring. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_check_dns_v2.py | New AAZ command: check-dns-v2 using 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_check_dns.py | Moves profile check-dns to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/init.py | Exposes new check-dns-v2 command. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_update.py | Moves endpoint update to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_show_geographic_hierarchy.py | Moves geographic hierarchy show to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_show.py | Moves endpoint show to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_delete.py | Moves endpoint delete to 2024-04-01-preview and changes output behavior. |
| src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_create.py | Moves endpoint create to 2024-04-01-preview. |
| src/azure-cli/azure/cli/command_modules/network/_params.py | Adds record_type arg for Traffic Manager profile commands. |
Comments suppressed due to low confidence (2)
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1
- The create checks use the JMESPath
TrafficManagerProfile.recordType, but the subsequent show/list checks userecordType. If the command output does not include theTrafficManagerProfilewrapper, this assertion will fail. Align the create assertions to the actual output shape (likelyrecordType, consistent with show/list), so the test validates the same contract across commands.
src/azure-cli/azure/cli/command_modules/network/custom.py:1 - In
create_traffic_manager_profile,record_typeis always included inargseven when it isNone, whileupdate_traffic_manager_profileadds it conditionally. For consistency and to avoid accidentally sending a null/explicit value through the AAZ pipeline, addrecord_typetoargsonly when it is notNone(same pattern as update).
# --------------------------------------------------------------------------------------------
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
network |
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related command
az network traffic-manager profile create -g MyResourceGroup -n MyTmProfile --routing-method Priority --unique-dns-name myapp123 --record-type A
Description
Updated to the new API version - 2024-04-01-preview
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.